package com.zone.core.model

/**
 *
 * @author last
 * @version <br></br>
 * @see
 * @since 1.0
 */
class Event<T>(private val value: T) {

    private var hasBeanHandled = false

    fun getValueIfNotHandled(): T? {
        return if (hasBeanHandled) {
            null
        } else {
            hasBeanHandled = true
            value
        }
    }

    fun get(): T {
        return value
    }
}

const val EVENT_BACK = 0xff
